package cn.koala.key.stock.service;

import cn.koala.key.stock.domain.vo.KeyInfoVO;
import cn.seed.common.core.Result;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * @description:KeyInfoService
 * @author 32415
 * @time 2019/04/28
 **/
public interface KeyInfoService{

    /**
     * 扫码获取钥匙信息
     * @description scanCode
     * @param keyBarCode
     * @param status(1:借出,2:在库)
     * @return cn.seed.common.core.Result<cn.koala.key.stock.domain.vo.KeyInfoVO>
     * @Exception
     * @author shuai.xu
     * @time 2019/5/6 15:21
    */
    Result<List<KeyInfoVO>> scanCode(List<String> keyBarCode,Integer status);

    /**
     * 挂失
     * @description reportLoss
     * @param keyBarCode 钥匙条码
     * @param dropReason 挂失原因
     * @return Result
     * @Exception
     * @author shuai.xu
     * @time 2019/5/6 15:07
     */
    Result reportLoss(String keyBarCode, String dropReason);

    /**
     * 入库
     * @description inStock
     * @param keyBarCode
     * @return Result
     * @Exception
     * @author shuai.xu
     * @time 2019/5/6 15:17
     */
    Result inStock(String keyBarCode);

    Result<List<KeyInfoVO>> getByCarNoAndCarVin(String carVin, String carNo, int num);

    Result<List<KeyInfoVO>> getByCarNoAndCarVin(String carVin, String carNo);

    /**
     * 根据车架集合查询钥匙信息
     * @description batchSelectKeyByCarVinList
     * @param file
     * @return cn.seed.common.core.Result<java.util.List<cn.koala.key.stock.domain.vo.KeyInfoVO>>
     * @Exception
     * @author shuai.xu
     * @time 2019/5/27 18:55
    */
    Result<List<KeyInfoVO>> batchSelectKeyByCarVinList(MultipartFile file);

    /**
     * 扫码获取钥匙信息(报废使用)
     * @description scrapedScanCode
     * @param keyBarCode
     * @return cn.seed.common.core.Result<java.util.List<cn.koala.key.stock.domain.vo.KeyInfoVO>>
     * @Exception
     * @author shuai.xu
     * @time 2019/5/30 10:42
    */
    Result<List<KeyInfoVO>> scrapedScanCode(List<String> keyBarCode);
}
